using System;
using Migrator.Framework;

namespace WineCellar.Migrator
{
    [Migration(4)]
    public class Migration004AddTestRegions :Migration
    {
        public override void Up()
        {
            Database.Insert("Region",
                            new[] {"Name", "DateAdded", "UserAdded"},
                            new string[] {"Bordeaux", DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), 1.ToString()});
            Database.Insert("Region",
                            new[] {"Name", "DateAdded", "UserAdded" },
                            new string[] { "Toscane", DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), 1.ToString() });
            Database.Commit();
        }

        public override void Down()
        {
            Database.ExecuteNonQuery("delete from region where name = 'Bordeaux'");
            Database.ExecuteNonQuery("delete from region where name = 'Toscane'");
        }
    }
}